package client.messages.commands;

import client.MapleClient;
import constants.ServerConstants.CommandType;

public class CommandObject {
    private String command;
    private int gmLevelReq;
    private CommandExecute exe;

    public CommandObject(String com, CommandExecute c, int gmLevel) {
        this.command = com;
        this.exe = c;
        this.gmLevelReq = gmLevel;
    }

    public boolean execute(MapleClient c, String[] splitted) {
        return this.exe.execute(c, splitted);
    }

    public CommandType getType() {
        return this.exe.getType();
    }

    public int getReqGMLevel() {
        return this.gmLevelReq;
    }

    public String getMessage() {
        return (this.command != null) ? this.exe.getMessage() : "";
    }
}
